﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PM.Web.Admin
{
    public partial class admin_gov_login_check : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["uid"]) && !string.IsNullOrEmpty(Request.QueryString["pwd"]))
            {
                string uid = Request.QueryString["uid"].Trim();
                string pwd = Request.QueryString["pwd"].Trim();

                int govid;
                DataAccess.PmData dal = new DataAccess.PmData();
                if ((govid = dal.CheckGovLogin(Common.GetCommunityCode(), uid, pwd)) > 0)
                {
                    Session["GovId"] = govid;
                    Response.Write("0");
                }
                else
                    Response.Write("1");
                Response.End();
            }
        }
    }
}